<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>

</html>
<script>
  let ws = new WebSocket('ws://localhost:3000')

  ws.onopen = function () {
    console.log('链接简历')
  }
  ws.onmessage = function (e) {
    console.log(e)
  }

  setInterval(() => {
    ws.send('6666')
  }, 2000);
  /* 
    不同浏览器之前的聊天
  
  */
</script>